import { Token } from "@/utils";
import Redirect from "../Redirect";

const AuthComponent = ({ children }: any) => {
  const token = Token.getToken("token");
  return token ? children : <Redirect to="/login" />;
};

export default AuthComponent;
